package com.world.rickcloudendpoint.common.utils;

/**
 * @description: 雪骆全局唯一id工具
 * @author: jlsong
 * @date: 2022/06/02 13:57:48
 * @version: 1.0
 */
public class SnowflakeIdUtil {

    private static SnowflakeIdWorker snowflakeIdWorker;

    public SnowflakeIdUtil(long workerId, long dataCenterId){
        snowflakeIdWorker = new SnowflakeIdWorker(workerId,dataCenterId);
    }

    public long nextId(){
        return snowflakeIdWorker.nextId();
    }

}
